﻿using System;
using ProjectBase.Core.PersistenceSupport;
using ProjectBase.Core;

namespace SLSYJ.Core
{
    public class Parent : PersistentObject
    {
        protected Parent() { }

        public Parent(string name, string dni)
        {
            Check.Require(!String.IsNullOrEmpty(name), "name may not be null or empty");
            Check.Require(!String.IsNullOrEmpty(dni), "dni may not be null or empty");
            Name = name;
            DNI = dni;
        }

        [DomainSignature]
        public virtual string Name { get; set; }

        [DomainSignature]
        public virtual string DNI { get; set; }

        public virtual int Age { get; set; }

        protected override string GetDomainObjectSignature()
        {
            return Name + "|" + DNI;
        }
    }
}
